<?	/* @var $entry Entry */ ?>
<?	/* @var $currentSection Section */ ?>
<? /* @var $twig Twig_Environment */ ?>
<? if (empty($currentSection)) $currentSection=null; ?>

<?	require(sfConfig::get('sf_plugins_dir')."/bertaTwigPlugin/lib/dirtyRequire.php"); ?>
<?
    switch ($type){
        case "standalone":
            $twigTemplateName="entry-standalone.html";
            break;
        case "listed":
        default:
            $twigTemplateName="entry-in-list.html";
            break;
    }

    if (!file_exists("{$templatePath}/{$twigTemplateName}")){
        $twigTemplateName="entry.html";
    }

	$entryTemplate = $twig->loadTemplate($twigTemplateName);
	$entryTemplate->display(array("currentSection" => $currentSection, "entry" => $entry, "settings" => Settings::getInstance()));
